<?php
/**
 * The following variables are available in this template:
 * - $this: the CrudCode object
 */
?>
<?php
echo "<?php\n";
$nameColumn=$this->guessNameColumn($this->tableSchema->columns);
$label=$this->pluralize($this->class2name($this->modelClass));
echo "\$page = Yii::app()->getRequest()->getParam('{$this->modelClass}_page') ? Yii::app()->getRequest()->getParam('{$this->modelClass}_page') : 1;";
echo "\$this->breadcrumbs=array(
    Yii::t('site','$label')=>array('admin','{$this->modelClass}_page'=>\$page),
    \$model->recordName,
    Yii::t('site','View'),
);\n";
?>

$this->menu=array(
    array('label'=>Yii::t('site','Item'),'items'=>array(
        array('label'=>Yii::t('site','Update <?php echo $this->class2name($this->modelClass); ?>'), 'url'=>array('update', 'id'=>$model-><?php echo $this->tableSchema->primaryKey; ?>,'<?php echo $this->modelClass ?>_page'=>$page)),
        array('label'=>Yii::t('site','Delete <?php echo $this->class2name($this->modelClass); ?>'), 'url'=>'#', 'linkOptions'=>array('submit'=>array('delete','id'=>$model-><?php echo $this->tableSchema->primaryKey; ?>,'<?php echo $this->modelClass ?>_page'=>$page),'confirm'=>'Are you sure you want to delete this item?')),
    )),
    array('label'=>Yii::t('site','All Items'),'items'=>array(
        array('label'=>Yii::t('site','Create New <?php echo $this->class2name($this->modelClass); ?>'), 'url'=>array('create','<?php echo $this->modelClass ?>_page'=>$page)),
        array('label'=>Yii::t('site','Manage <?php echo $label; ?>'), 'url'=>array('admin','<?php echo $this->modelClass ?>_page'=>$page)),
    )),
);
?>

<h1><?php echo "<?php echo Yii::t('site','View ".$this->class2name($this->modelClass)." <em>{recordName}</em>',array('{recordName}'=>\$model->recordName)); ?>"; ?></h1>

<?php echo "<?php"; ?> $this->widget('zii.widgets.CDetailView', array(
    'data'=>$model,
    'attributes'=>array(
<?php
foreach($this->tableSchema->columns as $column)
    echo "        '".$column->name."',\n";
?>
    ),
)); ?>
